Periodic Bank Statement
Delfinance generates reports automatically every day for easy access. At the end of each month, a consolidated file is created, containing all data for the monthly period.
List Available Reports
To retrieve the list of available reports, make a GET request to the following endpoint:
- URL
- cURL
GET https://apisandbox.delbank.com.br/baas/api/v1/customer-reports
curl -X GET "https://apisandbox.delbank.com.br/baas/api/v1/customer-reports" \
-H "x-delbank-api-key: {apiKey}"
Response:
[
{
"id": 1058,
"description": "Extrato com 35837 transações",
"progress": 100,
"period": {
"startDate": "2025-03-14T03:00:00Z",
"endDate": "2025-03-15T03:00:00Z"
},
"status": {
"name": "FINISHED",
"description": "Concluído"
},
"reportType": {
"name": "BANKSTATEMENT",
"description": "Extrato bancário"
}
}
]
A report with status: FINISHED
is ready for download.
Fetch Report Details
Once you have the report ID, make a GET request to check its details and see if a file is available.
- URL
- cURL
GET https://apisandbox.delbank.com.br/baas/api/v1/customer-reports/:id
curl -X GET "https://apisandbox.delbank.com.br/baas/api/v1/customer-reports/1058" \
-H "x-delbank-api-key: {apiKey}"
Response:
{
"id": 1058,
"description": "Extrato com 35837 transações",
"progress": 100,
"period": {
"startDate": "2025-03-14T03:00:00Z",
"endDate": "2025-03-15T03:00:00Z"
},
"status": {
"name": "FINISHED",
"description": "Concluído"
},
"reportType": {
"name": "BANKSTATEMENT",
"description": "Extrato bancário"
},
"files": [
{
"name": "14032025-00h00m00s_14032025-23h59m59s_00001",
"link": "https://bucket.s3.amazonaws.com/Reports/032025-23h59m59s_00001.csv?...",
"size": 7472779
}
]
}
⚠️ If the files
array is empty, the report is still being processed or has no available files.
Downloading the Report
To download, use the files.link
URL from the response. This link provides direct access to the report stored in S3.
🔹 Important Notes:
- The link expires after a certain period.
- Use it immediately to avoid access issues.
Example - Linux/MacOS Terminal:
wget "https://bucket.s3.amazonaws.com/Reports/032025-23h59m59s_00001.csv?..."
Or simply copy and paste the link into your browser.
Stream Format
In this method, you request the file directly, without needing to retrieve the report ID manually.
Endpoint:
GET https://apisandbox.delbank.com.br/baas/api/v1/customer-reports/bankstatement/{pattern}/stream
(pattern) Parameter Formats:
- yyyyMMdd → Example:
20250310
(March 10, 2025) - yyyyMM → Example:
202503
(March 2025)
If a report is available for the specified period, the server will stream the file directly, just like accessing the S3 link.